
<!-- Copyright IBM Corp, All Rights Reserved.

 SPDX-License-Identifier: Apache-2.0
-->

{% extends "layout.html" %}
{% block title %}Admin{% endblock %}
{% block body %}
{{ super() }}
<h2>Chain Information</h2>
<div class="container-fluid">
    <dl class="dl-horizontal">
        <dt>Id<dt> <dd>{{item.id}}</dd>
        <dt>Name<dt> <dd>{{item.name}}</dd>

        {% if item.consensus_plugin== consensus_plugins[0] or item.consensus_plugin== consensus_plugins[2]%}
            <dt>Consensus<dt> <dd>{{item.consensus_plugin}}</dd>
        {% else %}
            <dt>Consensus<dt> <dd>{{item.consensus_plugin}}/{{ item.consensus_mode }}</dd>
        {% endif %}
        <dt>Host<dt> <dd><a href="/view/host/{{item.host_id}}">{{item
        .host_id}}</a></dd>
        <dt>Create Time<dt> <dd>{{item.create_ts}}</dd>
				<dt>Network Type<dt> <dd>{{item.network_type}}</dd>
        <dt>Size<dt> <dd>{{item.size|string}}</dd>
        <dt>Status<dt> <dd>{{item.status}}</dd>
        <dt>Health<dt> <dd>{{item.health}}</dd>
				<dt>User Id<dt> <dd>{{item.user_id}}</dd>
				<dt>Apply Time<dt> <dd>{{item.apply_ts}}</dd>
				<dt>Release Time<dt> <dd>{{item.release_ts}}</dd>
				<dt>Duration<dt> <dd>{{item.duration}}</dd>
    <dt>Service URL<dt> <dd>
        {% for k in item.service_url%}
            {{ k }}: {{item.service_url[k]}}<br>
        {% endfor %}
    </dd>
        {% if item.containers %}
            <dt>Containers<dt>
            <dd>
            {% if item.containers|length >0 %}
                {% for c in item.containers.keys()%}
                    <a href="">{{ c }}</a><br>
                {% endfor %}
            {% endif %}
        {% endif %}
        </dd>
    </dl>
<!--
    <div class="container-fluid">
        {% if item.user_id %}
        <input value="Release" type="button" class="btn btn-danger btn-default btn-primary
               release_cluster_button"
               data-id="{{item.user_id}}"/>
        {% else %}
            <input value="Release" type="button" class="btn btn-danger btn-default btn-primary release_cluster_button" disabled
                   data-id="{{item.user_id}}"/>
        {% endif %}
    </div>
-->
</div>

{% endblock %}